<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditReservaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditReservaLabel_codigo}" for="codigo" />
                    <h:inputText id="codigo" value="#{reservaController.selected.codigo}" title="#{bundle.EditReservaTitle_codigo}" required="true" requiredMessage="#{bundle.EditReservaRequiredMessage_codigo}"/>
                    <h:outputLabel value="#{bundle.EditReservaLabel_fecha}" for="fecha" />
                    <h:inputText id="fecha" value="#{reservaController.selected.fecha}" title="#{bundle.EditReservaTitle_fecha}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditReservaLabel_dia}" for="dia" />
                    <h:inputText id="dia" value="#{reservaController.selected.dia}" title="#{bundle.EditReservaTitle_dia}" />
                    <h:outputLabel value="#{bundle.EditReservaLabel_horaInicio}" for="horaInicio" />
                    <h:inputText id="horaInicio" value="#{reservaController.selected.horaInicio}" title="#{bundle.EditReservaTitle_horaInicio}" >
                        <f:convertDateTime pattern="HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditReservaLabel_horaFin}" for="horaFin" />
                    <h:inputText id="horaFin" value="#{reservaController.selected.horaFin}" title="#{bundle.EditReservaTitle_horaFin}" >
                        <f:convertDateTime pattern="HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditReservaLabel_laboratorio}" for="laboratorio" />
                    <h:selectOneMenu id="laboratorio" value="#{reservaController.selected.laboratorio}" title="#{bundle.EditReservaTitle_laboratorio}" required="true" requiredMessage="#{bundle.EditReservaRequiredMessage_laboratorio}">
                        <f:selectItems value="#{laboratorioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditReservaLabel_profesor}" for="profesor" />
                    <h:selectOneMenu id="profesor" value="#{reservaController.selected.profesor}" title="#{bundle.EditReservaTitle_profesor}" required="true" requiredMessage="#{bundle.EditReservaRequiredMessage_profesor}">
                        <f:selectItems value="#{profesorController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{reservaController.update}" value="#{bundle.EditReservaSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditReservaViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{reservaController.prepareList}" value="#{bundle.EditReservaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditReservaIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
